package jfilters.lib;

/*
    Copyright Janne Liljeblad 2008.

    This file is part of JFilters.

    JFilters is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    JFilters is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with JFilters.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.awt.image.*;

//--- This class is used to guchar buffer from method: void gimp_pixel_rgn_get_row (...)
public class PixelColumn
{
	private WritableRaster raster;

	private int x;
	private int y;
	private int height;


	public PixelColumn( WritableRaster raster, int x, int y, int height )
	{
		this.raster = raster;

		this.x = x;
		this.y = y;
		this.height = height;
	}

	public void setPixel( int verticalOffset, int[] pixel )
	{
		 raster.setPixel( x, y + verticalOffset, pixel );
	}

	//--- Puts value of pixel into array
	public int[] getPixel( int verticalOffset, int[] pixel )
	{
		return raster.getPixel( x, y + verticalOffset, pixel );
	}

}//end class 